<?php
use yii\helpers\Url;
?>
<div class="panel">
    <div class="panel-title box-title">
        <span><strong>交流墙</strong></span>
        <span class="pull-right"><a href="#" class="font-12">更多》</a></span>
    </div>
    <div class="panel-body">
        <form id="w0" action="/" method="post">
            <div class="form-group input-group field-feed-content required">
                <textarea name="content" id="feed-content" cols="30" rows="10" class="form-control" placeholder="我要留言"></textarea>
                <span>
                    <button type="button" data-url="<?=Url::to(['site/add-feed']);?>" class="btn j-feed">发布</button>
                </span>
            </div>
        </form>
        <?php if(!empty($data['feed'])):?>
        <ul class="media-list media-feed feed-index ps-container ps-active-y">
            <?php foreach ($data['feed'] as $list):?>
                <li class="media">
                    <div class="media-left"><a href="#" rel="author" >

                            <img src="/statics/images/avatar/small.jpg" class="logoutimg" alt="">
                        </a></div>
                    <div class="media-body">
                        <div class="media-content"><a href="#" rel="author" ><?=$list['user']['username'];?>:</a><?=$list['content'];?></div>
                        <div class="media-action"><?=date('Y-m-d H:i:s',$list['created_at']);?></div>
                    </div>
                </li>
            <?php endforeach;?>
        </ul>
        <?php endif;?>
    </div>
</div>